<!--{include manage_header}-->

<div id="bdw" class="bdw">
<div id="bd" class="cf">
<div id="coupons">
	<div class="dashboard" id="dashboard">
		<ul></ul>
	</div>
    <div id="content" class="coupons-box clear mainwide">
		<div class="box clear">
            <div class="box-top"></div>
            <div class="box-content">
                <div class="head">
                    <h2>红包订单</h2>
				</div>
				<div class="sect" style="padding:0 10px;">
					<form method="get">
						<p style="margin:5px 0;">
						&nbsp;发送状态：
						<select name="is_success">
						<option value="0" <!--{if $is_success == 0}-->selected <!--{/if}-->>全部</option> 
						<option value="1" <!--{if $is_success == 1}-->selected <!--{/if}-->>发送成功</option> 
						<option value="2" <!--{if $is_success == 2}-->selected <!--{/if}-->>发送失败</option>
						</select>
						&nbsp;&nbsp;<input type="submit" value="搜索" class="formbutton"  style="padding:1px 6px;"/>
						</p>
					<form>
				</div>
                <div class="sect">
					<table id="orders-list" cellspacing="0" cellpadding="0" border="0" class="coupons-table">
					<tr>
						<th width="40">订单ID</th>
						<th width="200">团购</th>
						<th width="80">用户</th>
						<th width="50">红包金额(元)</th>
						<th width="80" nowrap>发送状态</th>
						<th width="120" nowrap>描述</th>
						<th width="150" nowrap>红包发送时间</th>
						
						<th width="50" nowrap>操作</th>
					</tr>
					<!--{loop $orders $index $one}-->
					<tr ${$index%2?'':'class="alt"'} id="order-list-id-{$one['id']}">
						<td>{$one['orderid']}</td>
						<td>{$one['team_id']}&nbsp;(<a class="deal-title" href="/team.php?id={$one['team_id']}" target="_blank">{$teams[$one['team_id']]['title']}</a>)</td>
						<td>
						<a href="/ajax/manage.php?action=userview&id={$one['user_id']}" class="ajaxlink">
						<!--{if $users[$one['user_id']]['username'] ==''}-->
						${time()} 
						<!--{else}-->
						{$users[$one['user_id']]['username']}
						<!--{/if}-->
						</a>
						</td>
						<td>
							${moneyit($one['total_amount']/100)}
						</td>
						<td>${$one['state'] == 0 ? '待发送' :($one['state'] == 1 ? '<font color=red>发送成功</font>': '发送失败') }</td>
						<td>
							{$one['note']}
						</td>
						<td>
							<!--{if $one['sendtime']>0}-->
							${date('Y-m-d H:i:s',$one['sendtime'])}
							<!--{else}-->
							未发送
							<!--{/if}-->
						</td>
						<td class="op" nowrap>
						<!--{if $one['state'] == 2}-->
							<a href="/ajax/manage.php?id={$one['id']}&action=bonus_view" class="ajaxlink">手动发送</a>
						<!--{/if}-->
						</td>
					</tr>
					<!--{/loop}-->
					<tr><td colspan="9">{$pagestring}</tr>
                    </table>
				</div>
            </div>
            <div class="box-bottom"></div>
        </div>
    </div>
</div>
</div> <!-- bd end -->
</div> <!-- bdw end -->

<!--{include manage_footer}-->
